package com.maxmlr.music.user.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author max
 * @version 1.0
 * @ClassName UserInfo
 * @Description 用户表
 * @Copyright Copyright (c) 2020: www.maxmlr.com.
 * @since 2020-06-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_info")
@ApiModel(value="UserInfo对象", description="用户表")
public class UserInfo extends Model<UserInfo> {

    private static final long serialVersionUID=1L;

    /**
     * id
     */
    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    @TableField("user_name")
    private String userName;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    @TableField("phone")
    private String phone;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    /**
     * 状态,；1:启用;；0:锁定;；9:黑名单
     */
    @ApiModelProperty(value = "状态,；1:启用;；0:锁定;；9:黑名单")
    @TableField("status")
    private Integer status;

    /**
     * 注册来源,；1、IOS；2、ANDROID；3、WAP；4、PC；5、后台添加
     */
    @ApiModelProperty(value = "注册来源,；1、IOS；2、ANDROID；3、WAP；4、PC；5、后台添加")
    @TableField("register_source")
    private Integer registerSource;

    /**
     * 头像对应文件id
     */
    @ApiModelProperty(value = "头像对应文件id")
    @TableField("head_img_id")
    private Integer headImgId;

    /**
     * 注册时间
     */
    @ApiModelProperty(value = "注册时间")
    @TableField("create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
